<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let zy = prompt('请选择+-*/ 输入Q退出')
        if (zy !== 'q') {
            let a = +prompt('请输入第1个值')
            let b = +prompt('请输入第2个值')
            switch (zy) {
                case '+':
                    alert(a + b)
                    break;
                case '-':
                    alert(a - b)
                    break;
                case '*':
                    alert(a * b)
                    break;
                case '/':
                    alert(a / b)
                    break;
            }
        }
    </script>
</body>

</html